<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
	
	<ui:composition>
		<h:panelGrid columns="3">
			<h:outputLabel id="nameLabel" for="nameInput" value="#{messages.name}:" />
			<h:inputText id="nameInput" value="#{nameAndTypeInputZoneBean.name}" required="true" requiredMessage="#{messages.input_required}" 
				validator="#{nameAndTypeInputZoneBean.checkNameForMediaType}" />
			<h:message id="nameMsg" for="nameInput" />
			<h:outputLabel id="typeLabel" for="typeSelect" value="#{messages.mediatype}" />
			<h:selectOneMenu id="typeSelect" value="#{nameAndTypeInputZoneBean.type}" required="true" requiredMessage="#{messages.input_required}">
				<f:selectItems value="#{nameAndTypeInputZoneBean.availableMediaTypes}" />
			</h:selectOneMenu>
			<h:message id="typeMsg" for="typeSelect" />
		</h:panelGrid>
		<h:commandButton id="addButton" action="#{nameAndTypeInputZoneBean.save}" value="#{messages.save}" />
	</ui:composition>
	
</html>